<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<script type="text/javascript" src="js/web2/familyTip.js"></script>
<script type="text/javascript">
	$(function() {
		$("#page").pager(
				{
					pagenumber : '${pm.currentPage}',
					pagecount : '${pm.totalPage}',
					buttonClickCallback : function(page) {
						$("#div_doing_comment").load("getDoingComment.htm?doingId=${doingId}&page="+page);
					}
				});
		
	});
	//删除
	function delCom(id){
		if(confirm("删除该条评论，您确定么？")){
			$.get("delCommentById.htm?id="+id,function(data){
				if(data=="success"){
				//	var commentCount=parseInt($("#comment_count").text());
				//	$("#comment_count").text(commentCount-1);
					$("#div_doing_comment").load("getDoingComment.htm?doingId=${doingId}");
				}
			});
		}
		
	}
</script>
<c:forEach items="${pm.list}" var="c">
	<div class="infobody_v3 clearfix pr mb15">
		<div class="fl">
	    	<a href="cover.htm?fid=${c.owner}" nickname="${c.commentUserName}" class="block fl mr10"><img src="${c.memberImageServer }${c.memberAvatar}" height="36" width="36" class="block" /></a>
	        <a href="cover.htm?fid=${c.owner}" nickname="${c.commentUserName}" class="fl ff6699 fb lh120">${c.commentUserName}</a><c:if test="${c.memberApproveStatus=='03' }"><img src="imgs/v+.png"  title="达人认证"/></c:if><i class="fc9">：</i>
	        
	    </div>
	    <div class="info_v3 fl">
	    	<span class="lh120">${c.replaceContent}</span><i class="ml10 fc9"><fmt:formatDate value="${c.gmtCreated}" pattern="MM月dd日 HH:mm"/></i></span>
	    </div>
	    <div class="operate_v3 pa">
	    	<c:if test="${member.owner==c.owner }">
	    	<a href="javascript:;" onclick="delCom('${c.identifier }');" class="fc9">删除</a>
	    	</c:if>
	    	<a href="javascript:;" onclick="replyMe('${c.commentUserName }','${c.identifier}');" class="fc9 ml20">回复</a>
	    </div>
	</div>
</c:forEach>

<div id="page" class="h_page"></div>
<%--<div class="commentcon_gol">
	<ul>
		<c:forEach items="${pm.list}" var="c">
			<li><img src="${c.memberImageServer }${c.memberAvatar }" alt="" class="face" />
				<p>
					<a href="javascript:void(0)" onmouseout="GUOGUO.hideFamilyTip()" onmousemove="GUOGUO.familyTip('${c.commentUserName }',this)" class="name">${c.commentUserName }</a>
					<c:if test="${c.memberApproveStatus=='03' }"><img src="imgs/v+.png"  title="达人认证"/></c:if>
					：${c.replaceContent }（<fmt:formatDate value="${c.gmtCreated}" pattern="MM月dd日 HH:mm"/>）<span
						class="hf">
						<c:if test="${member.owner==c.owner }">
							<a href="javascript:void(0)" onclick="delCom('${c.identifier }');">删除</a>
						</c:if>
						<c:choose>
							<c:when test="${member!=null }">
								<a href="javascript:void(0)" onclick="replyMe('${c.commentUserName }','${c.identifier }');">回复</a>
							</c:when>
							<c:otherwise>
								<a href="javascript:void(0)" onclick="GUOGUO.memberLogin();">回复</a>
							</c:otherwise>
						</c:choose>
						
					</span>
				</p>
			</li>
			<div class="clear"></div>
		</c:forEach>
	</ul>
	
</div>
<c:if test="${pm.totalPage > 1}">
	<div id="page" class="h_page"></div>
</c:if>
<div class="clear"></div>
--%>